﻿using System;
using System.Linq;

namespace Wala.Infrastructure
{
    public class URLConstant
    {
        public static String TIMLINE_HOST = "http://feed.wala.vn"; //using for timeline
        public static String PHOTO_HOST_UPLOAD = "http://image1.wala.vn"; //using for upload image
        public static String HOST_SECURE = "https://secure.wala.vn"; //using for locchat, shakehand
  	
        //test notification	
        //public static String TIMLINE_HOST = "http://118.107.68.92";
        //public static String PHOTO_HOST_UPLOAD = "http://image1.wala.vn";
        //public static String HOST_SECURE = "https://118.107.68.92";
  	
        public static String PHOTO_HOT = "/viewphoto?section=hot&photo_type=1&start={0}&end={1}";
  	
        /*
        * moment
        */
  	
        public static String FRIEND_MOMENT = "/viewmoment?section=friend&id={0}&start={1}&end={2}";
        public static String MY_MOMENT = "/viewmoment?section=my&start={0}&end={1}";
        public static String ALL_MOMENT = "/viewmoment?section=new&start={0}&end={1}";
  	
        /*
        * status
        */
        public static String POST_STATUS = "/status?action=create&text={0}&loc_text={1}&location_x={2}&location_y={3}&privacy={4}";
  	
        /*
        * file's name for upload is anything
        */
        public static String UPLOAD_AVATAR = "/avatar/?action=upload"; // POST method
  	
        public static String UPLOAD_COVER = "/cover/?action=upload"; // POST method
  	
        public static String GET_AVATAR = PHOTO_HOST_UPLOAD + "/avatar/index.php?action=get-avatar&id={0}";

        public static String GET_AVATAR_2 = PHOTO_HOST_UPLOAD + "/avatar/index.php?action=get-avatar&id=";
  	
        public static String GET_COVER = PHOTO_HOST_UPLOAD + "/cover/index.php?action=get-cover&id={0}";
  	
        public static String GET_AVATAR_THUMB = PHOTO_HOST_UPLOAD + "/avatar/index.php?action=get-thumb&id={0}";
  	
        public static String UPLOAD_PHOTO = "/image-upload/upload";
  	
        public static String UPDATE_PHOTO_METADATA = "/photo?action=create&album_id={0}&category_id={1}&link={2}&thumbnail_link={3}" +
                                                     "&location_x={4}&location_y={5}&caption={6}&loc_text={7}&privacy={8}";
  	
        /*
        * not with this version
        */
        public class TargetType
        {
            public const int PHOTO = 2;
            public const int STATUS = 1;
            public const int COMMENT = 3;
            public const int LIKE = 4;
            public const int ALBUM = 5;
            public const int CATEGORY = 6;
            public const int TAG = 7;
        }
  	
        public class ReciptionType
        {
            public static int User = 1;
        }
        /*
        * target_type: photo = 2, comment = 3, like = 4, album = 5, category = 6, tag = 7
        * action for like : like, unlike
        * action for comment : create, edit, delete
        * action for tag : tag, delete
        * reciption_id : user id who be tagged
        * reciption_type : type of object (user = 1, none-user : ) 
        */
        public static String LIKE = "/like?action=like&target_id={0}&target_type={1}&location_x={2}&location_y={3}";
  	
        public static String UNLIKE = "/like?action=unlike&target_id={0}&target_type={1}&location_x={2}&location_y={3}";
  	
        public static String CREATE_COMMENT = "/comment?action=create&text={0}&target_id={1}&target_type={2}&location_x={3}&location_y={4}";
  	
        public static String DELETE_COMMENT = "/comment?action=delete&comment_id={0}";

        public static String TAG = "/tag?action=tag&target_id={0}&target_type={1}&recipient_id={2}&recipient_type={3}&location_x={4}&location_y={5}";
  	
        /*
        * recipients = uid,type;uid,type;...
        */
        public static String MULTI_TAG = "/tag?action=tag&target_id={0}&target_type={1}&recipients={2}&location_x={3}&location_y={4}";
  	
        public static String UN_TAG = "/tag?action=delete_tag&target_id={0}&target_type={1}&recipient_id={2}&recipient_type={3}&location_x={4}&location_y={5}";
  	
        public static String GET_LIST_LIKE = "/viewaction?section=like&feed_id={0}&type={1}&start={2}&end={3}";
        public static String GET_LIS_TAG_FEED = "/viewaction?section=tag&feed_id={0}&type={1}&start={2}&end={3}";
        public static String GET_LIST_COMMENT = "/viewaction?section=comment&feed_id={0}&type={1}&start={2}&end={3}";
        public static String VIEW_PHOTO_DETAIL = "/viewphoto?section=detail&photo_id={0}";
        public static String VIEW_STATUS = "/status?action=viewdetail&status_id={0}";
  	
        public static String FOLLOW = "/privacy?action=follow&feed_id={0}&type={1}";
        public static String UNFOLLOW = "/privacy?action=unfollow&feed_id={0}&type={1}";
        /*
        * profile 
        */
        public static String VIEW_PROFILE = "/profile?action=geshpf&uid={0}";
        public static String VIEW_PROFILES = "/profile?action=geshpf&uids={0}";
        public static String REQUEST_COOKIE = "uid={0};token={1};version={2}";
  	
        /*
        * url for contact
        */
        public static String GET_CONTACT_VERSION = "/contact?section=version";
        public static String GET_CONTACT = "/contact?section=contact";
        public static String GET_CONTACT_BASIC = "/contact?section=friend";
        public static String GET_CONTACT_RELATION = "/contact?section=relation";
        public static String GET_CONTACT_PRESENCE = "/contact?section=presence";

        // Emoicons resource URL constant
        public static String EMOJS_RESOURCES = "/Wala.Modules.UIs;component/Resources/Emoicons/Emojs/";
        public static String STICKERS_RESOURCES = "/Wala.Modules.UIs;component/Resources/Emoicons/Stickers/";

        //ShakeHand
        public static string SHAKE_SEARCH = "/shake?action=search&lat={0}&long={1}";

        // Image url constants
        public static String DEFAULT_AVATAR = "http://nu6.upanh.com/b4.s34.d2/3cfe8a2070e7cd0c23b39bbd36c11468_53107256.iccontactlistpictureavai.png";
        public static String GOOGLE_PING = "www.google.com.vn";
    }

    public class TargetType
    {
        public const int PHOTO = 2;
        public const int STATUS = 1;
        public const int COMMENT = 3;
        public const int LIKE = 4;
        public const int ALBUM = 5;
        public const int CATEGORY = 6;
        public const int TAG = 7;
    }

    public class ReciptionType
    {
        public static int User = 1;
    }

        
}
